﻿// Copyright (c) Vitaly Kamiansky. All rights reserved. 
// See License.txt in the project root.

using System;

namespace Property.Windows.Forms
{
    /// <summary>
    /// Contains words that can come immediately after the opening
    /// of a property description.
    /// </summary>
    public static class ReloadableExtensionsCallbacksWindowsForms
    {
        /// <summary>
        /// <para>... synchronously if not overruled by another call in the specified period of time (when) ...</para>
        /// <para>( ! ) Don't forget to dispose of what you create with this word.</para>
        /// </summary>
        /// <param name="dueTime">Tell me how much time I should wait for another 
        /// call before letting this one pass.</param>
        /// <param name="testMode">Tell me if I have to ignore this word.</param>
        public static IReloaderPrototype<T> Delayed<T>(this Reloadable<T> source, TimeSpan dueTime, bool testMode = false)
        {
            return source.Each().Delayed(dueTime, testMode);
        }
    }
}
